<%@ page language="java" contentType="text/html; charset=EUC-KR"
	pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<!DOCTYPE html>
<html class="no-js" lang="ko-KR">
<head>
<!-- ie 호환성 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- ie 호환성 -->
<meta charset="UTF-8">
<title>GIGA BOX</title>
<link rel="icon" href="/teamGiga/movie/main.jsp" type="image/x-icon" />
<!--iOS/android/handheld specific -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="stylesheet" type="text/css" media="all"
	href="/teamGiga/style/flexslider.css" />
<link rel="stylesheet" type="text/css" media="all"
	href="/teamGiga/style/style.css" />
<link href="../css/contents.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--start fonts-->
<!--end fonts-->

<script src="/teamGiga/javascript/jquery.min.js"></script>
<script src="/teamGiga/javascript/jquery.flexslider-min.js"
	type="text/javascript"></script>
<script src="/teamGiga/javascript/modernizr.min.js"></script>
<script src="/teamGiga/javascript/customscript.js"
	type="text/javascript"></script>
<!-- FlexSlider -->
<script type="text/javascript">
	$(window).load(function() {
		$('.flexslider').flexslider({
			animation : "fade",
			controlNav : "thumbnails"
		});
		

	});

	
</script>
<!--start lightbox-->

<link rel="stylesheet" href="/teamGiga/style/prettyPhoto.css"
	type="text/css" media="screen" charset="utf-8" />
<script src="/teamGiga/javascript/jquery.prettyPhoto.js"></script>
<script type="text/javascript">
	jQuery(document).ready(function($) {
		$("input#one").click(function() {		
			$.ajax({
				url : '/teamGiga/tr.do?cmd=tr',
				type : "post",//"get,post"
				cache : false,
				dataType : "text",//"text,html,script,xml"
				success : function(data) {
					alert(data);
					$("div#seat").html(data);
				}
			});			
		});
		
		$("#allCheck").click(function(){		
			if($(this).attr("checked")=="checked"){
				var pr=0;
				$("input[name=rowcheck]").each(function(){
			    	$(this).attr("checked","checked");
			    	pr=pr+$(this).attr("value")*1;
			    
			    });
			    $("#total").val(pr);
			    temp=pr;
			}else{
				$("input[name=rowcheck]").each(function(){
			    	$(this).attr("checked",false);
			    	$("#total").val('0');
			    	temp=0;
			    });
			}
		});
		
		$("input[name=rowcheck]").click(function(){
			if($(this).attr("checked")=="checked"){
              temp=temp+$(this).attr("value")*1;
              $("#total").val(temp);
			}else{
				 temp=temp-$(this).attr("value")*1;
	              $("#total").val(temp);
			}
		});
		
		var temp=0;
		$("input[name=price]").each(function(){
			temp+=eval(this.value);
		});
		$("#total").val(temp);		
		
		$("#buyMovie").click(function(){
			 $("input[name=rowcheck]:checked").each(function(){
				$("#pushno").append("<input type='text' value="+$(this).attr("id")+" name='mno'>");
				document.noform.submit();
			}); 
		});
		
	});
	
</script>
<!--end lightbox-->
<style type="text/css">
body {
	background-color: #e8e8e8;
}

</style>
<!--start custom CSS-->
<!--end custom CSS-->


</head>


<body id="blog" class="home blog main cat-124-id">
	<header class="main-header">
		<div class="container">
			<div class="main-navigation">
				<nav id="navigation">
					<table>
						<tr>
							<td width="30%" style="vertical-align: bottom;"><div
									align="left">
									<h1 id="logo">
										<a href="/teamGiga/movie/main.jsp"><img src="/teamGiga/img/gigabox.jpg"
											width="30" height="30">GIGA BOX</a>
									</h1>
									GIGA BOX에 오신걸 환영합니다.
								</div></td>
							<td width="40%" style="vertical-align: bottom;">
								<form method="get" id="searchform" class="search-form"
									action="#" _lpchecked="1">
									<fieldset>
										<input style="text-align: center;" type="text" name="s" id="s"
											value="영화검색" onfocus="if(this.value=='영화검색')this.value='';"
											onfocusout="if(this.value=='')this.value='영화검색';"
											x-webkit-speech onwebkitspeechchange="transcribe(this.value)">
										<input id="search-image" class="sbutton" type="submit"
											style="vertical-align: top;" value="">

									</fieldset>
								</form>
							</td>
							<td width="30%"
								style="vertical-align: bottom; padding-bottom: 0px; padding-top: 20px"><ul
									id="menu-%ec%83%81%eb%8b%a8%eb%a9%94%eb%89%b4" class="menu">
									<li id="menu-item-1452"
										class="menu-item-last menu-item menu-item-type-post_type menu-item-object-page menu-item-1452">
										<c:choose>
											<c:when test="${!empty memberBean}">

												<form method="get" id="searchform" class="search-form"
													action="#" _lpchecked="1">
													<fieldset>
														<table style="vertical-align: bottom; margin-bottom: 0px">
															<tr>
																<td align="center"
																	style="vertical-align: bottom; text-align: left; padding-right: 0px;">
																	<b>${memberBean.nickname}</b> 님 환영합니다<br> 
																	<a href="/teamGiga/shoppinglist.do?cmd=shoppinglist"> 내 장바구니</a>
																</td>
																<td align="center"
																	style="vertical-align: bottom; text-align: right; padding-left: 0px;">
																	<input type="submit" value="구매내역"
																	style="background-color: #33B7EA; float: left; border-bottom-right-radius: 7px; border-top-right-radius: 7px; padding-top: 21px; padding-bottom: 22px; color: white;"></td>
															</tr>
															<tr>
																<td
																	style="padding-bottom: 0px; padding-top: 0px; padding-right: 0px;"><a
																	href="/teamGiga/movie/login1.jsp"
																	style="padding-bottom: 0px; padding-top: 0px; padding-right: 0px;">내
																		정보</a></td>
																<td
																	style="padding-bottom: 0px; padding-left: 0px; padding-top: 0px; padding-right: 0px;"><a
																	href="logout.do?cmd=logout"
																	style="padding-bottom: 0px; padding-left: 6px; padding-top: 0px; padding-right: 0px;">로그아웃</a></td>
															</tr>
														</table>
													</fieldset>
												</form>
											</c:when>

											<c:otherwise>
												<form method="POST" id="searchform" class="search-form"
													action="/teamGiga/mlogin.do?cmd=mlogin" _lpchecked="1">
													<fieldset>
														<table style="vertical-align: bottom; margin-bottom: 0px">
															<tr>
																<td align="right"
																	style="vertical-align: bottom; text-align: right; padding-right: 0px;"><input
																	type="text" name="s" id="s" value=" 아이디"
																	onfocus="if(this.value==' 아이디')this.value='';"
																	onfocusout="if(this.value=='')this.value=' 아이디';"
																	style="text-align: left; width: 150px; height: 21px;"><br>
																	<input type="text" name="s" id="s" value=" 비밀번호"
																	onfocus="if(this.value==' 비밀번호')this.value='';"
																	onfocusout="if(this.value=='')this.value=' 비밀번호';"
																	style="text-align: left; width: 150px; height: 21px;"></td>
																<td align="left"
																	style="vertical-align: bottom; text-align: left; padding-left: 0px;"><input
																	type="submit" value="login" id="login"
																	style="background-color: #33B7EA; float: left; border-bottom-right-radius: 7px; border-top-right-radius: 7px; padding-top: 21px; padding-bottom: 22px; color: white;"></td>
															</tr>
															<tr>
																<td
																	style="padding-bottom: 0px; padding-top: 0px; padding-right: 0px;"><a
																	href="/teamGiga/movie/login1.jsp"
																	style="padding-bottom: 0px; padding-top: 0px; padding-right: 0px;">아이디/비밀번호
																		찾기</a></td>
																<td
																	style="padding-bottom: 0px; padding-left: 0px; padding-top: 0px; padding-right: 0px;"><a
																	href="/teamGiga/movie/login1.jsp"
																	style="padding-bottom: 0px; padding-left: 6px; padding-top: 0px; padding-right: 0px;">회원가입</a></td>
															</tr>
														</table>
													</fieldset>
												</form>
											</c:otherwise>
										</c:choose>

									</li>


								</ul></td>
						</tr>



						<!--#nav-primary-->
					</table>
				</nav>
			</div>
			`
			<div id="header">

				<div class="secondary-navigation">
					<nav id="navigation">
						<ul id="menu-top" class="menu">
							<li id="menu-item-1458"
								class="menu-item-first menu-item menu-item-type-custom menu-item-object-custom current-menu-item current_page_item menu-item-home menu-item-1458"><a
								href="/teamGiga/movie/main.jsp">홈</a></li>
							<li id="menu-item-1132"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1132"><a
								href="#">최신영화</a></li>
							<li id="menu-item-1143"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1143"><a
								href="movieReservation.do?cmd=movieReservation">예매</a></li>
							<li id="menu-item-1141"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1141"><a
								href="/teamGiga/qna.do?cmd=qnaList">리뷰</a></li>
							<li id="menu-item-1138"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1138"><a
								href="/teamGiga/qna.do?cmd=qnaList">이벤트</a></li>
							<li id="menu-item-1140"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1140"><a
								href="voddown.do?cmd=vodlist">VOD다운로드</a></li>
							<li id="menu-item-1139"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1139"><a
								href="/teamGiga/qna.do?cmd=qnaList">요청게시판</a></li>
							<li id="menu-item-1142"
								class="menu-item-last menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1142"><a
								href="/teamGiga/qna.do?cmd=qnaList">이벤트</a></li>
							<li id="menu-item-1139"
								class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-1139"><a
								href="/teamGiga/qna.do?cmd=qnaList">QnA</a></li>
						</ul>
					</nav>
				</div>

			</div>
			<!--#header-->
		</div>
		<!--.container-->
	</header>
	<div class="main-container">

		<div id="page" class="single">
		<%-- 	여기에 장바구니 만들기 ${memberBean.id } --%>

			<div id="wrapper">

				<!-- header -->
				<!-- <div id="header">
			<div class="topInfoWrap">
				<div class="topInfoArea clfix">
					<div class="logo">
						<p>
							<em>SIST</em> 관리자모드
						</p>
					</div>
					<div class="loginWrap">
						<span class="fir">2012.05.17</span> <span>13:30:22</span> <span><em>관리자님</em>
							좋은 하루 되세요</span> <a href="" class="btnLogout"><img
							src="../img/common/btn_logout.gif" alt="로그아웃" /></a>
					</div>
				</div>
			</div>
		</div> -->
				<!--// header -->

				<div id="container">

					<div id="contentsWrap" class="contentsWrap">
						<div class="contents">
							<h1 class="title">장바구니리스트</h1>
							<!-- <div class="btnSet clfix mgb15">
								<span class="fr"> <span class="button"><a href="#">목록</a></span>
								</span>
							</div> -->
						<form action="#" method="post" id="vodbuyform" name="vodbuyform">
							<table class="bbsWrite mgb35" >
								<caption></caption>
								<colgroup>
									<col width="95" />
									<col width="395" />
									<col width="95" />
									<col />
								</colgroup>
								<!-- <tbody>
									<tr>
										<th>업체명</th>
										<td><select style="width: 200px;">
												<option>선택하세요</option>
										</select></td>
										<th>상품명</th>
										<td><input type="text" name="" class="inputText"
											size="30" /> <span class="button"><a href="#">검색</a></span></td>
									</tr>
								</tbody> -->
							</table>
							<table class="bbsList" id="cartlist" name="cartlist" >
								<colgroup>
									<col width="100" />
									<col width="150" />
									<col width="150" />
									<col width="150" />
									<col width="150" />
									<col width="100" />

								</colgroup>
								<thead>

									<tr>
										<th scope="col"><input type="checkbox" id="allCheck" ></th>
										<th scope="col">이미지</th>
										<th scope="col">상품명</th>										
										<th scope="col">가격</th>
										<th scope="col">날짜</th>
										<th scope="col">삭제</th>

									</tr>
								</thead>

								<tbody>
                    <c:forEach var="i" items="${Shoppinglist}">
                    				
									<tr>
									
										<td><input type="checkbox" id="${i.mno}"  value="${i.pay}" name="rowcheck" checked="checked"></td>
										<td><img src="/teamGiga/upload/${i.fileimg}" width="50"height="50"></td>
										<td>${i.mname }
											<input type="hidden" name="mname" value="${i.mname }" id="mname">
										</td>										
						            	<td>${i.pay }
						            	<input type="hidden" name="price" value="${i.pay }" id="price">	
						            	</td>
						            	
										<td>${i.validdate}</td>			
										<td><span><a href="/teamGiga/delshopping.do?cmd=delshopping&mno=${i.mno}">삭제</a></span></td>			
				            		</tr>
				            		
				            		<tr>
				            		<td>
				            		
				            		</td>
				            		</tr>
				            		
</c:forEach>


								</tbody>

							</table>
																
							<table class="bbsList" align="right">
								<tr align="right">
									<th align="right">총합계 &nbsp; <input type="text"
										name="total" id="total" class="inputText" size="30"
										align="right" value="0" /></th>
									<td><input type="button" value="구매" id="buyMovie" onclick="buyVod()">
									</td>
											</tr>
									
							</table>
							</form>
									<form action="/teamGiga/vodbuy.do?cmd=vodbuy" method="post" name="noform">
									<div id="pushno">
				            		</div>
							</form>
							
						</div>




					</div>
				</div>
			</div>


			<div id="footer">
				<p>copyright(C) 2012 TODOS. all rights reserved.</p>
			</div>
		</div>

	</div>



	</div>
	<footer>
		<div class="container">
			<div class="footer-widgets">
				<div class="f-widget two">
					<div class="widget">
						<h3>제작정보</h3>
						<div class="textwidget">
							2014년 11월 제작시작<br>

						</div>
					</div>
				</div>


			</div>
			<!--.footer-widgets-->
			<div class="copyrights">
				<!--start copyrights-->
				<div class="row" id="copyright-note">
					<div class="left">
						Team GIGA BOX</a>
					</div>
					<div class="top">
						<a href="#top" class="toplink">Back to Top</a>
					</div>
				</div>
				<!--end copyrights-->
			</div>
		</div>
		<!--.container-->
	</footer>
	<!--footer-->
</body>
</html>